// src/stores/userStore.ts
import { defineStore } from 'pinia'

interface UserState {
  name: string
  num: number
}

export const useStore = defineStore('user', {
  state: (): UserState => ({
    name: 'burt',
    num: 0
  }),
  actions: {
    addNum() {
      this.num++
    },
    setUser(name: string, num: number) {
      this.name = name
      this.num = num
    }
  }
})
